//---------------------------------------------------------------------------
#ifndef uFormatNombreH
#define uFormatNombreH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include "CComboBx.h"
#include "CEdit.h"
#include "CEditNum.h"
#include "CCheckB.h"
//---------------------------------------------------------------------------
#include "uDessin.h"
#include "CBitBtn.h"
//---------------------------------------------------------------------------
class TfrmFormatNombre : public TForm
{
__published:	// Composants gérés par l'EDI
    CComboBox *cbxMonaie;
    CComboBox *cbxFmtPos;
    CComboBox *cbxFmtNegCur;
    CEditNum *ednNbDecimale;
    CComboBox *cbxDecimal;
    TGroupBox *GroupBox1;
    CEdit *Text_edPositif;
    CEdit *Text_edNegatif;
    TLabel *LblMonnaie;
    TLabel *LblPositif;
    TLabel *Label3;
    TLabel *Label4;
    TLabel *Label5;
    TLabel *LblComment;
    CComboBox *cbxChiffreGroupe;
    CEditNum *edNbChiffreGroupe;
    TLabel *Label7;
    TLabel *Label8;
    CComboBox *cbxLeadingZero;
    TLabel *Label1;
    CComboBox *cbxFmtNegNum;
    TCheckBox *ckZeroSignificatif;
    CEditNum *ednNbUniteArrondies;
    TLabel *Label2;
    CBitBtn *cmdOK;
    TLabel *lblSignePlus;
    CComboBox *cbxSignePlus;
    CBitBtn *btnParDefaut;
  TCheckBox *ckDecimalZeroSignificatif;
    void __fastcall cmdOKClick(TObject *Sender);
    void __fastcall RefreshApercu(TObject *Sender);
    void __fastcall cbxChiffreGroupeKeyUp(TObject *Sender, WORD &Key,
          TShiftState Shift);
    void __fastcall cbxChiffreGroupeKeyPress(TObject *Sender, char &Key);
    void __fastcall btnParDefautClick(TObject *Sender);
private:
    bool            bCurrency;
    bool            m_Init;
    EICNumberFmt   *m_pNumFormat;
    EICCurrencyFmt *m_pCurFormat;
    const EICNumberFmt   *m_pNumFormatDefaut;
    const EICCurrencyFmt *m_pCurFormatDefaut;
    void __fastcall InitNumber( );
    void __fastcall InitCurrency( );
public:		// Déclarations de l'utilisateur
    __fastcall TfrmFormatNombre(TComponent* Owner, EICNumberFmt *p, const EICNumberFmt *pDef);
    __fastcall TfrmFormatNombre(TComponent* Owner, EICCurrencyFmt *p, const EICCurrencyFmt *pDef);

    __property EICNumberFmt   *NumFormat={read=m_pNumFormat};
    __property EICCurrencyFmt *CurFormat={read=m_pCurFormat};
};
//---------------------------------------------------------------------------
void __export __fastcall ChangeFormatCurrency( EICCurrencyFmt **pCurFormat, EICCurrencyFmt *pCurFormatParDefaut);
void __export __fastcall ChangeFormatNumber(   EICNumberFmt **pNumFormat, EICNumberFmt *pNumFormatParDefault);
//---------------------------------------------------------------------------
#endif
